<html>
<link href="../enzo.css" rel="stylesheet" type="text/css">
  <head>
    <title>Generating Enzo Initial Conditions</title>
  </head>
<body> 
    <h1>Generating Enzo Initial Conditions</h1>

<p>The Enzo User Manual has an excellent section on  <a href="../amr_guide/index-inits.html">creating initial conditions</a>, so we will merely present the reader with several example files that can be run with the initial conditions generator.  Example parameter files are also listed here for completeness, but are discussed more thoroughly in the section on <a href="paramfiles_top.html">writing parameter files</a>.  Inits is run by typing:</p>
<p>
<tt>inits [-d] InitialConditionsFile</tt>.
</p>
<p>
Where -d is the debug flag, which produces somewhat verbose output.  The output of inits is a set of files containing dark matter particle position and velocity files and (when baryons are turned on) files containing baryon density and velocity information.
</p>

<h3>Single-grid dark matter-only</h3>
<p>
<a href="SingleGrid_dmonly.inits">Inits file</a>, <a href="SingleGrid_dmonly_amr.param">AMR parameter file</a></p>
<h3>Single-grid dark matter + gas</h3>
<p>
<a href="SingleGrid_dm_hydro.inits">Inits file</a>, <a href="SingleGrid_dm_hydro_unigrid.param">Unigrid parameter file</a>, <a href="SingleGrid_dm_hydro_amr.param">AMR parameter file</a>
</p>
<h3>Dark matter + hydrodynamics, nested grids</h3>
<p>
<a href="MultiGrid_dm_hydro.TopGrid.inits">Top grid inits file</a>, <a href="MultiGrid_dm_hydro.SubGrid.inits">Sub grid inits file</a>, <a href="MultiGrid_dm_hydro.SubSubGrid.inits">Sub-Sub-grid inits file</a>, <a href="MultiGrid_dm_hydro_amr.param">AMR parameter file</a>.</p>
<p>When generating a multigrid simulation, inits is run in a slightly different way than when creating a single-grid initial condition.  Every grid except for the most highly refined grid must be generated using the -s flag and also specifying the name of the grid beneath it, like this:</p>
<p>
<tt>inits [-d] -s SubGrid.inits TopGrid.inits</tt><br>
<tt>inits [-d] -s SubSubGrid.inits SubGrid.inits</tt><br>
<p>
This is so that inits knows which sections of the coarser grid to remove dark matter particles from so that there is no overlap.  The finest grid is then generated in the normal fashion:
</p>
<p>
<tt>inits [-d] SubSubGrid.inits</tt>.
</p>

<p>&nbsp;</p>
<p>
<a href="algorithms_top.html">Previous - Enzo algorithms</a><br>
<a href="paramfiles_top.html">Next - Writing parameter files</a><br>
</p>

<p>&nbsp;</p>
<p>
<a href="../index.html">Go to the Enzo home page</a>
</p>
<hr WIDTH="100%">
<center>&copy; 2004 &nbsp; <a href="http://cosmos.ucsd.edu">Laboratory for Computational Astrophysics</a><br></center>
<center>last modified February 2004<br>
by <a href="mailto:bwoshea (AT) lanl.gov">B.W. O'Shea</a></center>

</body>
</html>
